function [time, optS] = Spectral_Cyclic(C, m, K)

[N, ~] = size(C);
d = 2;
n = N/d;

time_start = tic;
[S,~] = eigs(C,d);

optS = S;
S0 = S;
optV = -Inf;
for sample = 1:K
    randO = unirandO(d);
    for i = 1:n
        S0( (i-1)*d+1:i*d , : ) = Proj_Cyclic( S((i-1)*d+1:i*d,:) * randO, m);
    end
    optvi = sum(dot(S0, C * S0));
    if optvi > optV
        optS = S0;
        optV = optvi;
    end
end

time = toc(time_start);
end